
#ifndef _TTG_PIPELINE_IDATAPROCESSOR_
#define _TTG_PIPELINE_IDATAPROCESSOR_
#include "Common/Definitions.h"

#include "../ContextMap.h"

namespace ttg_internal
{
	namespace pipeline
	{
		//Interface for essence, thaqt can process data.
		//It can node, GPU-binding, etc.
		template <class T>
		class IDataProcessor
		{
			public:
			//protected:
				//Applies changes. Will be called after "process()".
				//Note: ID is ID of current context.
				virtual void startProcessing(ttg::pipeline::ContextID ID) = 0;
				//Processes data.
				virtual void process(ttg::pipeline::ContextID ID, T data) = 0;
				//Applies changes. Will be called after "process()".
				//Note: ID is ID of current context.
				virtual void finishProcessing(ttg::pipeline::ContextID ID) = 0;
				//Returns abstract difficulty of data.
				//If returned value is lesser that 0, than processing is unavailable.
				virtual double getDifficulty(T data) = 0;
			//template <class T> friend class ProcessKernel;
			//template <class ProcessInType, class OutType> friend class CpuSubPipelineKernel;
		};
	}
}

#endif
